package create_创建型.prototype_pattern_原型模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/03/16:19
 * @Description:
 */
public class ProtoTypePatternDemo {
	public static void main(String[] args) {
		Shape shape = ShapeCache.getShape(1);
		shape.draw();
		System.err.println(shape);
		Shape shape2 = ShapeCache.getShape(1);
		System.out.println(shape2);
		shape.setName("aaaa");
		System.err.println(shape);
	}
}

